home *** CD-ROM | disk | FTP | other *** search
/ SPACE 1 / SPACE - Library 1 - Volume 1.iso / program / 130 / gfatip15 / gfatip15.lst < prev    next >
File List  |  1988-02-05  |  2KB  |  69 lines

  1. '                             GFATIP15.BAS
  2. '                Copyright 1988 Marathon Computer Press
  3. '                              Written by
  4. '                           Barbara J. Behuniak
  5. '                             John B. Holder
  6. '                                Brian Lake
  7. '
  8. '  This tip file and the rest of the archive are in the public domain in so
  9. ' far as no charge of any kind is assessed for the distribution of it in it's
  10. ' entirety.  Marathon Computer Press retains all rights the code contained
  11. ' herein.  You may use any or all of the code in any application you write for
  12. ' commercial or non-commercial use.  Please give us credit if you do so.
  13. '
  14. '
  15. '
  16. ' Now let's call our procedures to make the end result of a software reboot.
  17. '
  18. '
  19. @Do_a_reboot ! Call in the ST Wreckers..
  20. ' Once called your system will reboot just as if you pressed the reset.
  21. '
  22. '
  23. Procedure Do_a_reboot
  24.   Reboot$=""
  25.   @Insert_rebooter_asm
  26.   Machine_code%=Varptr(Reboot$)
  27.   @Supexec(Machine_code%)
  28.   '
  29. Return ! Even though we never will.
  30. '
  31. '
  32. '
  33. Procedure Insert_rebooter_asm
  34.   '
  35.   Do
  36.     Read Asm%
  37.     Exit If Asm%<0
  38.     Reboot$=Reboot$+Mki$(Asm%)
  39.   Loop
  40.   '
  41. Return
  42. '
  43. '
  44. '
  45. ' Disassembled Machine code for the file REBOOT2.O
  46. '
  47. Data 0,0,0,0,0,5632,0,0
  48. Data 0,0,17081,0,1056,17081,0,1082
  49. Data 11897,0,0,8313,0,4,20176,26470
  50. Data 24930,28527,29696,0,0,0
  51. Data -1
  52. '
  53. '
  54. ' This next Xbios routine is not for Beginners!!!!!!!
  55. ' It will execute a routine in the 68000 supervisor mode
  56. ' The address must be passed in this manner:
  57. ' Prog_address=Varptr("function")
  58. ' For example you Bload a ML program in the variable Prog$, then you would
  59. ' use Prog_address=Varptr(Prog$)
  60. '
  61. '
  62. ' This routine was extracted from the GFA Basic Companion II .LST library and
  63. ' is Copyright 1988 Marathon Computer Press.  Provided in this GFATIP by
  64. ' MichTron and Marathon Computer Press as a public service.
  65. '
  66. Procedure Supexec(Machine_code%)
  67.   Dummy=Xbios(38,L:Machine_code%)
  68. Return
  69.